package com.rfigueroa.demos.cassandrakundera;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import com.rfigueroa.demos.cassandrakundera.domain.User;

public class KunderaExample
{
    public static void main(String[] args)
    {
        User user = new User();
        user.setUserId("0002");
        user.setFirstName("Ricardo");
        user.setLastName("Figueroa");
        user.setCity("Peru");
        
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("cassandra_pu");
        EntityManager em = emf.createEntityManager();
        
        em.persist(user);
        em.close();    
        emf.close();    
    }
}